// ./routes/sharedRoutes.ts
import { RouteRecordRaw } from "vue-router";
import ACCESS_ENUM from "../../assets/content/ACCESS_ENUM";

const routeList: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "主页",
    component: () => import("../../pages/Home.vue"),
  },
  {
    path: "/questionView",
    name: "题目展示",
    component: () => import("../../pages/QuestionView.vue"),
  },
  {
    path: "/addQuestion",
    name: "添加题目",
    component: () => import("../../pages/AddOrUpdateQuestionView.vue"),
    meta: { access: ACCESS_ENUM.ADMIN },
  },
  {
    path: "/meQuestion",
    name: "管理题目",
    component: () => import("../../pages/MEQuestionView.vue"),
    meta: { access: ACCESS_ENUM.ADMIN },
  },
  {
    path: "/updateQuestion/:id",
    name: "修改题目",
    props: true,
    component: () => import("../../pages/AddOrUpdateQuestionView.vue"),
    meta: {
      access: "disable",
    },
  },
  {
    path: "/doQuestion/:id",
    name: "完成题目",
    props: true,
    component: () => import("../../pages/DoQuestionView.vue"),
    meta: {
      access: "disable",
    },
  },
  // {
  //   path: "/mdeditor",
  //   name: "文本编辑器",
  //   component: () => import("../../pages/CodeCommitView.vue"),
  // },
];

export { routeList };
